package com.yanqu.road.entity.tradewar;

import com.alibaba.fastjson.JSON;
import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.player.UserBaseInfo;

import java.util.Objects;

/**
 * 商战通缉
 */
public class TradeWarWanted extends DataObject {

	private String wantedUid;

	private long userId;

	private UserBaseInfo userBaseInfo = new UserBaseInfo();

	private long wantedUserId;

	private UserBaseInfo wantedBaseInfo = new UserBaseInfo();

	private long wantedScore;

	private long wantedTime;

	private int battleTimes;

	private String reward;

	private long finishTime;

	private boolean scoreReward;

	private int activityId;

	private int useItemId;

	public String getWantedUid() {
		return wantedUid;
	}

	public void setWantedUid(String wantedUid) {
		if(!Objects.equals(this.wantedUid, wantedUid)) {
			this.wantedUid = wantedUid;
			setUpdateOption();
		}
	}

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		if(this.userId != userId) {
			this.userId = userId;
			setUpdateOption();
		}
	}

	public UserBaseInfo getUserBaseInfo() {
		return userBaseInfo;
	}

	public String getUserBaseInfoJsonStr(){
		if(null == userBaseInfo){
			return "{}";
		}else {
			return JSON.toJSONString(userBaseInfo);
		}
	}

	public void setUserBaseInfo(UserBaseInfo userBaseInfo) {
		this.userBaseInfo = userBaseInfo;
		setUpdateOption();
	}

	public long getWantedUserId() {
		return wantedUserId;
	}

	public void setWantedUserId(long wantedUserId) {
		if(this.wantedUserId != wantedUserId) {
			this.wantedUserId = wantedUserId;
			setUpdateOption();
		}
	}

	public UserBaseInfo getWantedBaseInfo() {
		return wantedBaseInfo;
	}

	public String getWantedBaseInfoJsonStr(){
		if(null == wantedBaseInfo){
			return "{}";
		}else {
			return JSON.toJSONString(wantedBaseInfo);
		}
	}

	public void setWantedBaseInfo(UserBaseInfo wantedBaseInfo) {
		this.wantedBaseInfo = wantedBaseInfo;
		setUpdateOption();
	}

	public long getWantedScore() {
		return wantedScore;
	}

	public void setWantedScore(long wantedScore) {
		if(this.wantedScore != wantedScore) {
			this.wantedScore = wantedScore;
			setUpdateOption();
		}
	}

	public long getWantedTime() {
		return wantedTime;
	}

	public void setWantedTime(long wantedTime) {
		if(this.wantedTime != wantedTime) {
			this.wantedTime = wantedTime;
			setUpdateOption();
		}
	}

	public int getBattleTimes() {
		return battleTimes;
	}

	public void setBattleTimes(int battleTimes) {
		if(this.battleTimes != battleTimes) {
			this.battleTimes = battleTimes;
			setUpdateOption();
		}
	}

	public String getReward() {
		return reward;
	}

	public void setReward(String reward) {
		this.reward = reward;
	}

	public long getFinishTime() {
		return finishTime;
	}

	public void setFinishTime(long finishTime) {
		if (this.finishTime != finishTime) {
			this.finishTime = finishTime;
			setUpdateOption();
		}
	}

	public boolean isScoreReward() {
		return scoreReward;
	}

	public void setScoreReward(boolean scoreReward) {
		if (this.scoreReward != scoreReward) {
			this.scoreReward = scoreReward;
			setUpdateOption();
		}
	}

	public int getActivityId() {
		return activityId;
	}

	public void setActivityId(int activityId) {
		if(this.activityId != activityId) {
			this.activityId = activityId;
			setUpdateOption();
		}
	}

	public int getUseItemId() {
		return useItemId;
	}

	public void setUseItemId(int useItemId) {
		if(this.useItemId != useItemId) {
			this.useItemId = useItemId;
			setUpdateOption();
		}
	}
}
